<%@ page import="com.example.domain.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<!DOCTYPE html>
<html>
<head>
    <title>小说管理系统</title>
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <link rel="stylesheet" href="./css/fontawesome.min.css">
    <script src="./js/jquery-3.7.1.min.js"></script>
    <script src="./js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
    <link rel="stylesheet" href="./css/admin.css">
    <link rel="stylesheet" href="./css/iconfont.css">
</head>
<body>
<nav class="navbar navbar-inverse" style="margin-bottom: 0;">
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
            <li><a style="color:white;">小说管理系统</a></li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
            <li><a>${user.username}</a></li>
            <li class="dropdown">
                <a href="AdminOutLoginServlet"><span>退出</span></a>
            </li>
        </ul>
    </div>
</nav>
    <%
    User user = (User) session.getAttribute("user");
    if (user==null){
%>
<script type="text/javascript">
    alert("请先登录！");
    window.location.href="login.jsp";
</script>
    <%
    }
%>
